package eit.controller ;

import eit.model.Issue;
import eit.service.IssueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

/**
 *
 * @author acoustic
 */

@Controller
@RequestMapping("/Issue")
public class IssueController
{
	@Autowired
	private IssueService issueService ;
	
	
	@RequestMapping(value="/View/{ID}", method=RequestMethod.GET)
	public String getIssueView(ModelMap _Model, @PathVariable int ID)
	{
		Issue displayIssue ;
			
		displayIssue = issueService.loadIssue(ID) ;
		
		_Model.addAttribute("DisplayIssue", displayIssue) ;
		
		return "IssueView";
	}
	
	
	public String getIssueNew(ModelMap _Model)
	{
		
		
		return "";
	}

}
